<i-menu active-name="1-2" theme="dark" width="auto" :class="menuitemClasses">
  @foreach ($menus as $index => $menu)
    @if (!isset($menu['children']) || empty($menu['children']))
    <Menu-Item name="{{ $menu['title'] }}" >
      <i class="iconfont {{ $menu['icon'] }}"></i>
      <span>{{ $menu['title'] }}</span>
    </Menu-Item>
    @endif

    @if (isset($menu['children']) && !empty($menu['children']))
    <Submenu name="{{ $menu['title'] }}">
      <template slot="title">
        <i class="iconfont {{ $menu['icon'] }}"></i>
        <span>{{ $menu['title'] }}</span>
      </template>

      @foreach ($menu['children'] as $item)
      <Menu-Item name="child-{{ $index }}-{{ $item['title'] }}-">{{ $item['title'] }}</Menu-Item>
      @endforeach
    </Submenu>
    @endif
  @endforeach
</i-menu>